using JK.EventRouter.Eventing;

namespace JK.EventRouter.WorkItems
{
    public class CompletableWorkCommand : ICompletableWorkItem
    {
        private readonly IAction _onComplete;

        public CompletableWorkCommand(IAction onComplete)
        {
            _onComplete = onComplete;
        }

        public bool CanComplete
        {
            get { return true; }
        }

        public void OnComplete()
        {
            _onComplete.Act();
        }
    }
}